<?php

namespace app\api\controller;

use app\common\controller\Api;

/**
 * 反馈模块
 */
class Feedback extends Api
{
    protected $noNeedLogin = [''];
    protected $noNeedRight = '*';


    /**
     *
     * 提交反馈
     */
    public function feedback()
    {
        $param = input();
        $param['user_id'] = $this->uid;
        $this->success('成功', \app\api\model\Feedback::create($param));
    }

    /**
     *
     * 我的反馈
     */
    public function myFeedback()
    {
        $this->success('成功', \app\api\model\Feedback::all(['user_id' => $this->uid]));
    }
}